package com.ruoyi.provider.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 维修结案信息
 * @TableName ahct_maintenance
 */
@TableName(value ="ahct_maintenance")
@Data
public class AhctMaintenance implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 案件号
     */
    private String caseNumber;

    /**
     * 逻辑删除
     */
    private Integer deleted;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 派修单位名称
     */
    private String maintenancerName;

    /**
     * 维修勘验跟踪记录
     */
    private String maintenanceRecord;

    /**
     * 维修是否超时：1是 0否
     */
    private Integer isOvertime;

    /**
     * 维修完成时间
     */
    private Date finishTime;

    /**
     * 垫支人
     */
    private String supporter;

    /**
     * 垫支金额
     */
    private BigDecimal supportCost;

    /**
     * 垫支时间
     */
    private Date supportTime;

    /**
     * 维修清单预算
     */
    private BigDecimal maintenanceBudget;

    /**
     * 实际维修清单决算
     */
    private BigDecimal maintenanceFinalAccounts;

    /**
     * 维修收款信息
     */
    private String maintenancePayment;

    /**
     * 专票金额
     */
    private BigDecimal specialTicketAmount;

    /**
     * 进项税额
     */
    private BigDecimal purchasesTaxes;

    /**
     * 税率（默认6%）
     */
    private Integer taxRate;

    /**
     * 普票金额
     */
    private BigDecimal generalTicketAmount;

    /**
     * 合计成本票金额
     */
    private BigDecimal totalInvoiceAmount;

    /**
     * 缺票金额
     */
    private BigDecimal missingTicketAmount;

    /**
     * 尾款结算金额
     */
    private BigDecimal finalPayment;

    /**
     * 尾款汇款时间
     */
    private Date finalPaymentTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AhctMaintenance other = (AhctMaintenance) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCaseNumber() == null ? other.getCaseNumber() == null : this.getCaseNumber().equals(other.getCaseNumber()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getMaintenancerName() == null ? other.getMaintenancerName() == null : this.getMaintenancerName().equals(other.getMaintenancerName()))
            && (this.getMaintenanceRecord() == null ? other.getMaintenanceRecord() == null : this.getMaintenanceRecord().equals(other.getMaintenanceRecord()))
            && (this.getIsOvertime() == null ? other.getIsOvertime() == null : this.getIsOvertime().equals(other.getIsOvertime()))
            && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
            && (this.getSupporter() == null ? other.getSupporter() == null : this.getSupporter().equals(other.getSupporter()))
            && (this.getSupportCost() == null ? other.getSupportCost() == null : this.getSupportCost().equals(other.getSupportCost()))
            && (this.getSupportTime() == null ? other.getSupportTime() == null : this.getSupportTime().equals(other.getSupportTime()))
            && (this.getMaintenanceBudget() == null ? other.getMaintenanceBudget() == null : this.getMaintenanceBudget().equals(other.getMaintenanceBudget()))
            && (this.getMaintenanceFinalAccounts() == null ? other.getMaintenanceFinalAccounts() == null : this.getMaintenanceFinalAccounts().equals(other.getMaintenanceFinalAccounts()))
            && (this.getMaintenancePayment() == null ? other.getMaintenancePayment() == null : this.getMaintenancePayment().equals(other.getMaintenancePayment()))
            && (this.getSpecialTicketAmount() == null ? other.getSpecialTicketAmount() == null : this.getSpecialTicketAmount().equals(other.getSpecialTicketAmount()))
            && (this.getPurchasesTaxes() == null ? other.getPurchasesTaxes() == null : this.getPurchasesTaxes().equals(other.getPurchasesTaxes()))
            && (this.getTaxRate() == null ? other.getTaxRate() == null : this.getTaxRate().equals(other.getTaxRate()))
            && (this.getGeneralTicketAmount() == null ? other.getGeneralTicketAmount() == null : this.getGeneralTicketAmount().equals(other.getGeneralTicketAmount()))
            && (this.getTotalInvoiceAmount() == null ? other.getTotalInvoiceAmount() == null : this.getTotalInvoiceAmount().equals(other.getTotalInvoiceAmount()))
            && (this.getMissingTicketAmount() == null ? other.getMissingTicketAmount() == null : this.getMissingTicketAmount().equals(other.getMissingTicketAmount()))
            && (this.getFinalPayment() == null ? other.getFinalPayment() == null : this.getFinalPayment().equals(other.getFinalPayment()))
            && (this.getFinalPaymentTime() == null ? other.getFinalPaymentTime() == null : this.getFinalPaymentTime().equals(other.getFinalPaymentTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCaseNumber() == null) ? 0 : getCaseNumber().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getMaintenancerName() == null) ? 0 : getMaintenancerName().hashCode());
        result = prime * result + ((getMaintenanceRecord() == null) ? 0 : getMaintenanceRecord().hashCode());
        result = prime * result + ((getIsOvertime() == null) ? 0 : getIsOvertime().hashCode());
        result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
        result = prime * result + ((getSupporter() == null) ? 0 : getSupporter().hashCode());
        result = prime * result + ((getSupportCost() == null) ? 0 : getSupportCost().hashCode());
        result = prime * result + ((getSupportTime() == null) ? 0 : getSupportTime().hashCode());
        result = prime * result + ((getMaintenanceBudget() == null) ? 0 : getMaintenanceBudget().hashCode());
        result = prime * result + ((getMaintenanceFinalAccounts() == null) ? 0 : getMaintenanceFinalAccounts().hashCode());
        result = prime * result + ((getMaintenancePayment() == null) ? 0 : getMaintenancePayment().hashCode());
        result = prime * result + ((getSpecialTicketAmount() == null) ? 0 : getSpecialTicketAmount().hashCode());
        result = prime * result + ((getPurchasesTaxes() == null) ? 0 : getPurchasesTaxes().hashCode());
        result = prime * result + ((getTaxRate() == null) ? 0 : getTaxRate().hashCode());
        result = prime * result + ((getGeneralTicketAmount() == null) ? 0 : getGeneralTicketAmount().hashCode());
        result = prime * result + ((getTotalInvoiceAmount() == null) ? 0 : getTotalInvoiceAmount().hashCode());
        result = prime * result + ((getMissingTicketAmount() == null) ? 0 : getMissingTicketAmount().hashCode());
        result = prime * result + ((getFinalPayment() == null) ? 0 : getFinalPayment().hashCode());
        result = prime * result + ((getFinalPaymentTime() == null) ? 0 : getFinalPaymentTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", caseNumber=").append(caseNumber);
        sb.append(", deleted=").append(deleted);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", maintenancerName=").append(maintenancerName);
        sb.append(", maintenanceRecord=").append(maintenanceRecord);
        sb.append(", isOvertime=").append(isOvertime);
        sb.append(", finishTime=").append(finishTime);
        sb.append(", supporter=").append(supporter);
        sb.append(", supportCost=").append(supportCost);
        sb.append(", supportTime=").append(supportTime);
        sb.append(", maintenanceBudget=").append(maintenanceBudget);
        sb.append(", maintenanceFinalAccounts=").append(maintenanceFinalAccounts);
        sb.append(", maintenancePayment=").append(maintenancePayment);
        sb.append(", specialTicketAmount=").append(specialTicketAmount);
        sb.append(", purchasesTaxes=").append(purchasesTaxes);
        sb.append(", taxRate=").append(taxRate);
        sb.append(", generalTicketAmount=").append(generalTicketAmount);
        sb.append(", totalInvoiceAmount=").append(totalInvoiceAmount);
        sb.append(", missingTicketAmount=").append(missingTicketAmount);
        sb.append(", finalPayment=").append(finalPayment);
        sb.append(", finalPaymentTime=").append(finalPaymentTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}